gl renderer: Round size up when rendering to a texture
authorTimm Bäder <mail@baedert.org>
Sat, 23 Feb 2019 03:50:25 +0000 (04:50 +0100)
committerTimm Bäder <mail@baedert.org>
Sat, 23 Feb 2019 03:50:25 +0000 (04:50 +0100)
Both the clip we use and the viewport we set should contain the entire
texture size and not potentially clip the last pixel.

gsk/gl/gskglrenderer.c

index 27df97fc9e1cf996c1e39b8b5a0193870eff07c8..24f545249167207cc8d008b35adf54848a133598 100644 (file)
@@ -2458,8 +2458,8 @@ add_offscreen_ops (GskGLRenderer         *self,
                    guint                  flags)
 {
   const float scale = ops_get_scale (builder);
-  const float width  = bounds->size.width  * scale;
-  const float height = bounds->size.height * scale;
+  const float width  = ceilf (bounds->size.width  * scale);
+  const float height = ceilf (bounds->size.height * scale);
   const float dx = builder->dx;
   const float dy = builder->dy;
   int render_target;